chore(ci): gate PyPI publishing behind the production environment - #195
Conversation
The publish job now binds the production GitHub environment, so its protection rules (required reviewer, deployment refs) pause every publish for approval. A release-branch push no longer publishes with no human in the loop.
|
@claude please review this PR |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
|
@claude please review this PR — post-merge backfill: the review run failed on the previous token. |
|
Claude finished @jfrench9's task in 46s —— View job Review: gate PyPI publishing behind the
|
Summary
Publishing to PyPI now waits for a human: the
publishjob binds theproductionGitHub environment, whose protection rules (required reviewer; deployment refsrelease/*andmain) gate every publish. Until now a push of arelease/*branch — made by an automation token fromcreate-release.yml— published immediately with no approval step, and a publish cannot be taken back.Changes
.github/workflows/publish.yml—environment: productionon thepublishjob, with a comment. Nothing else changes.Compatibility
No package or API change. The OIDC trusted publisher accepts any environment (publishes have succeeded with no environment declared, so the publisher carries no environment constraint), so no PyPI-side change is needed now; a later tightening can pin the PyPI publisher to this environment name. Release choreography is unchanged:
create-release.ymlbumps and pushesrelease/X.Y.Z; the publish run then waits for approval.Testing
actionlint -shellcheck= .github/workflows/publish.yml— clean (with shellcheck on, only pre-existingSC2086/SC2129notes inrun:blocks this PR does not touch)